<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>html中调用button函数</title>
</head>

<body>
	<script type="text/javascript">
		function Calc(){
			var x = parseInt(document.getElementById("Text1").value);
			var y = parseInt(document.getElementById("Text2").value);
			var resultValue = Math.pow(x,y);
			document.getElementById("Text3").value = resultValue;
		}
	</script>
	
	
	<input type="text" size="10" id="Text1" value="" />的
	<input type="text" size="10" id="Text2" value="" />次方等于
	<input type="text" size="10" id="Text3" value="" />
	
	<input type="button" value="计算" onClick="Calc()" />
</body>
</html>
